From: Lars Ingebrigtsen Date: Thu, 14 Oct 2021 17:53:00 +0000 (+0200) Subject: define-key doc string improvement X-Git-Tag: archive/raspbian/1%29.2+1-2+rpi1^2~5^2~16^2~3291^2~955 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:///%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:/?a=commitdiff_plain;h=732666b86ec7c415a4d7246db3e9709a95bebf95;p=emacs.git define-key doc string improvement * src/keymap.c (Fdefine_key): Explain what the STRING is used for. (local-set-key "\C-c\C-c" (define-keymap :name "Zot" "a" '("foo" . ignore) "b" '("gazonk" . ignore))) --- diff --git a/src/keymap.c b/src/keymap.c index be45d2be1e2..5324f7f0213 100644 --- a/src/keymap.c +++ b/src/keymap.c @@ -1047,7 +1047,9 @@ DEF is anything that can be a key's definition: function definition, which should at that time be one of the above, or another symbol whose function definition is used, etc.), a cons (STRING . DEFN), meaning that DEFN is the definition - (DEFN should be a valid definition in its own right), + (DEFN should be a valid definition in its own right) and + STRING is the menu item name (which is used only if the containing + keymap has been created with a menu name, see `make-keymap'), or a cons (MAP . CHAR), meaning use definition of CHAR in keymap MAP, or an extended menu item definition. (See info node `(elisp)Extended Menu Items'.)